package com.magicmovie.web.service;

import com.magicmovie.entity.IndexCategory;
import com.magicmovie.web.service.impl.IndexCategoryServiceImpl;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "service", fallback = IndexCategoryServiceImpl.class)
public interface IndexCategoryService {
    @RequestMapping(value = "/indexCategory/deleteByPrimaryKey", method = RequestMethod.GET)
    int deleteByPrimaryKey(@RequestParam("id") Integer id);

    @RequestMapping(value = "/indexCategory/insert", method = RequestMethod.POST)
    int insert(@RequestBody IndexCategory record);

    @RequestMapping(value = "/indexCategory/selectByPrimaryKey", method = RequestMethod.GET)
    IndexCategory selectByPrimaryKey(@RequestParam("id") Integer id);

    @RequestMapping(value = "/indexCategory/updateByPrimaryKey", method = RequestMethod.POST)
    int updateByPrimaryKey(@RequestBody IndexCategory record);

    @RequestMapping(value = "/indexCategory/findAll", method = RequestMethod.GET)
    List<IndexCategory> findAll();

    @RequestMapping(value = "/indexCategory/selectByParams", method = RequestMethod.POST)
    List<IndexCategory> selectByParams(@RequestBody Map<String, Object> params);
}
